﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    /// <summary>
    /// Interaction logic for SETUPABON.xaml
    /// </summary>
    public partial class TAUFIMG
    {

        public TAUFIMG()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VICC_FOLDERS();
            this.DataContext = MV;
            InitializeComponent(); 
         }

        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
            ART = Helper.ApplicationPath.Replace("\\Exe", "\\Documents");
            Helper.CheckDirectory(Helper.ApplicationPath.Replace("\\Exe", ""), "Documents"); 
            base.Window_Loaded(sender, e);
        } 
        public void Image_MouseRightButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (!System.IO.File.Exists(PHOTOLINK))
            {
                return;
            }
            if (!System.IO.File.Exists(@"C:\WINDOWS\system32\mspaint.exe"))
            {

                return;
            }
            string PATH = "\"" + PHOTOLINK + "\"";
            ProcessStartInfo pinf = new ProcessStartInfo(@"C:\WINDOWS\system32\mspaint.exe", PATH);
            Process pro = Process.Start(pinf);
            //pro.Start();

        }

        public void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            IsImageMax = !IsImageMax;
        } 
    }
}
